<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>libnetconf: Call Home</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../libnetconf-logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">libnetconf
   &#160;<span id="projectnumber">0.10.0-146_trunk</span>
   </div>
   <div id="projectbrief">NETCONF Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../modules.html"><span>Modules</span></a></li>
      <li><a href="../../annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('db/de7/group__callhome.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Call Home</div>  </div>
</div><!--header-->
<div class="contents">

<p>libnetconf's functions implementing NETCONF Call Home (both SSH and TLS) mechanism. More information can be found at <a class="el" href="../../da/d4e/callhome.html">Call Home</a> page.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga556966a9c54e814e02b4afadf128b9b7"><td class="memItemLeft" align="right" valign="top">struct nc_session *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/de7/group__callhome.html#ga556966a9c54e814e02b4afadf128b9b7">nc_callhome_accept</a> (const char *username, const struct nc_cpblts *cpblts, int *timeout)</td></tr>
<tr class="memdesc:ga556966a9c54e814e02b4afadf128b9b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Accept incoming Call Home connection and create NETCONF session on it.  <a href="#ga556966a9c54e814e02b4afadf128b9b7">More...</a><br/></td></tr>
<tr class="separator:ga556966a9c54e814e02b4afadf128b9b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5c1437b22b1ccac95d0ba15c34912f78"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/de7/group__callhome.html#ga5c1437b22b1ccac95d0ba15c34912f78">nc_callhome_connect</a> (struct nc_mngmt_server *host_list, uint8_t reconnect_secs, uint8_t reconnect_count, const char *server_path, char *const argv[], int *com_socket)</td></tr>
<tr class="memdesc:ga5c1437b22b1ccac95d0ba15c34912f78"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connect NETCONF server to a management center (NETCONF client) using Call Home mechanism.  <a href="#ga5c1437b22b1ccac95d0ba15c34912f78">More...</a><br/></td></tr>
<tr class="separator:ga5c1437b22b1ccac95d0ba15c34912f78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafa8e04fb09dcafcd7c06d086e835f25f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/de7/group__callhome.html#gafa8e04fb09dcafcd7c06d086e835f25f">nc_callhome_listen</a> (unsigned int port)</td></tr>
<tr class="memdesc:gafa8e04fb09dcafcd7c06d086e835f25f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start listening on client side for incoming Call Home connection.  <a href="#gafa8e04fb09dcafcd7c06d086e835f25f">More...</a><br/></td></tr>
<tr class="separator:gafa8e04fb09dcafcd7c06d086e835f25f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga93a36d2d6c0e1d1eb0c65d70c6ded3cc"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/de7/group__callhome.html#ga93a36d2d6c0e1d1eb0c65d70c6ded3cc">nc_callhome_listen_stop</a> (void)</td></tr>
<tr class="memdesc:ga93a36d2d6c0e1d1eb0c65d70c6ded3cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stop listening on client side for incoming Call Home connection.  <a href="#ga93a36d2d6c0e1d1eb0c65d70c6ded3cc">More...</a><br/></td></tr>
<tr class="separator:ga93a36d2d6c0e1d1eb0c65d70c6ded3cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa08ac6e90c2b70dd2461bab461f3ed08"><td class="memItemLeft" align="right" valign="top">struct nc_mngmt_server *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/de7/group__callhome.html#gaa08ac6e90c2b70dd2461bab461f3ed08">nc_callhome_mngmt_server_add</a> (struct nc_mngmt_server *list, const char *host, const char *port)</td></tr>
<tr class="memdesc:gaa08ac6e90c2b70dd2461bab461f3ed08"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a new management server specification to the end of a list.  <a href="#gaa08ac6e90c2b70dd2461bab461f3ed08">More...</a><br/></td></tr>
<tr class="separator:gaa08ac6e90c2b70dd2461bab461f3ed08"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3db211a665c56160c167619b633b6cb0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/de7/group__callhome.html#ga3db211a665c56160c167619b633b6cb0">nc_callhome_mngmt_server_free</a> (struct nc_mngmt_server *list)</td></tr>
<tr class="memdesc:ga3db211a665c56160c167619b633b6cb0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free a management server description structure(s). The function doesn't free only the item refered by given pointer, but the complete list of management servers is freed.  <a href="#ga3db211a665c56160c167619b633b6cb0">More...</a><br/></td></tr>
<tr class="separator:ga3db211a665c56160c167619b633b6cb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8b22e5afbc118e69b42b0f66388f56ab"><td class="memItemLeft" align="right" valign="top">struct nc_mngmt_server *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/de7/group__callhome.html#ga8b22e5afbc118e69b42b0f66388f56ab">nc_callhome_mngmt_server_getactive</a> (struct nc_mngmt_server *list)</td></tr>
<tr class="memdesc:ga8b22e5afbc118e69b42b0f66388f56ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Searches for the item from the list, which was marked and used by the last call to <a class="el" href="../../db/de7/group__callhome.html#ga5c1437b22b1ccac95d0ba15c34912f78" title="Connect NETCONF server to a management center (NETCONF client) using Call Home mechanism. ">nc_callhome_connect()</a> to a successfully establish Call Home connection.  <a href="#ga8b22e5afbc118e69b42b0f66388f56ab">More...</a><br/></td></tr>
<tr class="separator:ga8b22e5afbc118e69b42b0f66388f56ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1c2942e68d263d674adf1381bc5e7083"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/de7/group__callhome.html#ga1c2942e68d263d674adf1381bc5e7083">nc_callhome_mngmt_server_rm</a> (struct nc_mngmt_server *list, struct nc_mngmt_server *remove)</td></tr>
<tr class="memdesc:ga1c2942e68d263d674adf1381bc5e7083"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove the specified management server description from the list.  <a href="#ga1c2942e68d263d674adf1381bc5e7083">More...</a><br/></td></tr>
<tr class="separator:ga1c2942e68d263d674adf1381bc5e7083"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>libnetconf's functions implementing NETCONF Call Home (both SSH and TLS) mechanism. More information can be found at <a class="el" href="../../da/d4e/callhome.html">Call Home</a> page. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga556966a9c54e814e02b4afadf128b9b7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct nc_session* nc_callhome_accept </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>username</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const struct nc_cpblts *&#160;</td>
          <td class="paramname"><em>cpblts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>timeout</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Accept incoming Call Home connection and create NETCONF session on it. </p>
<p>This function uses transport protocol set by <a class="el" href="../../db/d52/group__session.html#ga6e125c035cdebae8c49ff962866c0806" title="Set transport protocol for the sessions created by subsequent nc_session_connect() calls...">nc_session_transport()</a>. If NC_TRANSPORT_SSH (default value) is set, configure's &ndash;disable-libssh option cannot be used. If NC_TRANSPORT_TLS is set, configure's &ndash;enable-tls must be used</p>
<p>To make this function available, you have to include <a class="el" href="../../d1/da1/libnetconf__ssh_8h.html" title="libnetconf&#39;s header for control libssh. ">libnetconf_ssh.h</a> or <a class="el" href="../../d5/d22/libnetconf__tls_8h.html" title="libnetconf&#39;s header for control openssl. ">libnetconf_tls.h</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">username</td><td>Name of the user to login to the server. The user running the application (detected from the effective UID) is used if NULL is specified. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cpblts</td><td>NETCONF capabilities structure with capabilities supported by the client. Client can use <a class="el" href="../../db/d52/group__session.html#ga8283673aa18f079a89a437efb436a55a" title="Get NULL terminated list of the default capabilities supported by libnetconf including the list of na...">nc_session_get_cpblts_default()</a> to get the structure with the list of all the capabilities supported by libnetconf (this is used in case of a NULL parameter). </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">timeout</td><td>Timeout for waiting for incoming call home in milliseconds. Negative value means an infinite timeout, zero causes to return immediately. If a positive value is set and timeout is reached, NULL is returned and timeout is changed to 0. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Structure describing the NETCONF session or NULL in case of an error. NULL is also returned in case of timeout, but in that case also timeout value is changed to 0. </dd></dl>

</div>
</div>
<a class="anchor" id="ga5c1437b22b1ccac95d0ba15c34912f78"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int nc_callhome_connect </td>
          <td>(</td>
          <td class="paramtype">struct nc_mngmt_server *&#160;</td>
          <td class="paramname"><em>host_list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>reconnect_secs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>reconnect_count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>server_path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *const&#160;</td>
          <td class="paramname"><em>argv</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>com_socket</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Connect NETCONF server to a management center (NETCONF client) using Call Home mechanism. </p>
<p>Use <a class="el" href="../../db/d52/group__session.html#ga6e125c035cdebae8c49ff962866c0806" title="Set transport protocol for the sessions created by subsequent nc_session_connect() calls...">nc_session_transport()</a> function to specify which transport protocol should be used.</p>
<p>Note that reconnect_secs and reconnect_count parameters are used only before a connection is established, then the function returns. It's up to the caller to reconnect if the session goes down. It can be detected using returned PID.</p>
<p>To make this function available, you have to include <a class="el" href="../../d1/da1/libnetconf__ssh_8h.html" title="libnetconf&#39;s header for control libssh. ">libnetconf_ssh.h</a> or <a class="el" href="../../d5/d22/libnetconf__tls_8h.html" title="libnetconf&#39;s header for control openssl. ">libnetconf_tls.h</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">host_list</td><td>List of management servers descriptions where the function will try to connect to. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">reconnect_secs</td><td>Time delay in seconds between connection attempts (even to the same server but it depends on reconnect_count). See /netconf/ssh/call-home/applications/application/reconnect-strategy/interval-secs value in ietf-netconf-server YANG data model. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">reconnect_count</td><td>Number times the function tries to connect to a single server before moving on to the next server in the host_list. See /netconf/ssh/call-home/applications/application/reconnect-strategy/count-max value in ietf-netconf-server YANG data model. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">server_path</td><td>Optional parameter to specify path to the transport server. If not specified, the function get transport protocol according to value set by <a class="el" href="../../db/d52/group__session.html#ga6e125c035cdebae8c49ff962866c0806" title="Set transport protocol for the sessions created by subsequent nc_session_connect() calls...">nc_session_transport()</a> (default value is SSH transport). For the NC_TRANSPORT_SSH the '/usr/sbin/sshd' path is used (OpenSSH server), in case of NC_TRANSPORT_TLS the '/usr/sbin/stunnel' path is used (OpenSSL server). </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">argv</td><td>List of arguments to be used by execv() when starting the server specified in server_path parameter. If server_path not specified (NULL), argv is ignored. Remember, that the server is supposed to read data from stdin and write data to stdout (inetd mode). So, for example sshd is running with -i option. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">com_socket</td><td>If not NULL, function returns TCP socket used for Call Home connection. Caller is supposed to close returned socket when it is no more needed. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>-1 on error. In case of success, function forks the current process running the transport protocol server and returns its PID. </dd></dl>

</div>
</div>
<a class="anchor" id="gafa8e04fb09dcafcd7c06d086e835f25f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int nc_callhome_listen </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>port</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start listening on client side for incoming Call Home connection. </p>
<p>To make this function available, you have to include <a class="el" href="../../d1/da1/libnetconf__ssh_8h.html" title="libnetconf&#39;s header for control libssh. ">libnetconf_ssh.h</a> or <a class="el" href="../../d5/d22/libnetconf__tls_8h.html" title="libnetconf&#39;s header for control openssl. ">libnetconf_tls.h</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">port</td><td>Port number where to listen. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>EXIT_SUCCESS or EXIT_FAILURE on error. </dd></dl>

</div>
</div>
<a class="anchor" id="ga93a36d2d6c0e1d1eb0c65d70c6ded3cc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int nc_callhome_listen_stop </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Stop listening on client side for incoming Call Home connection. </p>
<p>To make this function available, you have to include <a class="el" href="../../d1/da1/libnetconf__ssh_8h.html" title="libnetconf&#39;s header for control libssh. ">libnetconf_ssh.h</a> or <a class="el" href="../../d5/d22/libnetconf__tls_8h.html" title="libnetconf&#39;s header for control openssl. ">libnetconf_tls.h</a>.</p>
<dl class="section return"><dt>Returns</dt><dd>EXIT_SUCCESS or EXIT_FAILURE if libnetconf is not listening. </dd></dl>

</div>
</div>
<a class="anchor" id="gaa08ac6e90c2b70dd2461bab461f3ed08"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct nc_mngmt_server* nc_callhome_mngmt_server_add </td>
          <td>(</td>
          <td class="paramtype">struct nc_mngmt_server *&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>port</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add a new management server specification to the end of a list. </p>
<p>To make this function available, you have to include <a class="el" href="../../d1/da1/libnetconf__ssh_8h.html" title="libnetconf&#39;s header for control libssh. ">libnetconf_ssh.h</a> or <a class="el" href="../../d5/d22/libnetconf__tls_8h.html" title="libnetconf&#39;s header for control openssl. ">libnetconf_tls.h</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">list</td><td>Current list where the server description will be added. If NULL, a new list is created and returned by the function. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">host</td><td>Host name of the management server. It specifies either a numerical network address (for IPv4, numbers-and-dots notation as supported by inet_aton(3); for IPv6, hexadecimal string format as supported by inet_pton(3)), or a network host-name, whose network addresses are looked up and resolved. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">port</td><td>Port of the management server. If this argument is a service name (see services(5)), it is translated to the corresponding port number. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>NULL on error, created/modified management servers list. </dd></dl>

</div>
</div>
<a class="anchor" id="ga3db211a665c56160c167619b633b6cb0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int nc_callhome_mngmt_server_free </td>
          <td>(</td>
          <td class="paramtype">struct nc_mngmt_server *&#160;</td>
          <td class="paramname"><em>list</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Free a management server description structure(s). The function doesn't free only the item refered by given pointer, but the complete list of management servers is freed. </p>
<p>To make this function available, you have to include <a class="el" href="../../d1/da1/libnetconf__ssh_8h.html" title="libnetconf&#39;s header for control libssh. ">libnetconf_ssh.h</a> or <a class="el" href="../../d5/d22/libnetconf__tls_8h.html" title="libnetconf&#39;s header for control openssl. ">libnetconf_tls.h</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">list</td><td>List of management servers to be freed. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>EXIT_SUCCESS or EXIT_FAILURE. </dd></dl>

</div>
</div>
<a class="anchor" id="ga8b22e5afbc118e69b42b0f66388f56ab"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct nc_mngmt_server* nc_callhome_mngmt_server_getactive </td>
          <td>(</td>
          <td class="paramtype">struct nc_mngmt_server *&#160;</td>
          <td class="paramname"><em>list</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Searches for the item from the list, which was marked and used by the last call to <a class="el" href="../../db/de7/group__callhome.html#ga5c1437b22b1ccac95d0ba15c34912f78" title="Connect NETCONF server to a management center (NETCONF client) using Call Home mechanism. ">nc_callhome_connect()</a> to a successfully establish Call Home connection. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">list</td><td>List of management servers. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to the last connected management server. </dd></dl>

</div>
</div>
<a class="anchor" id="ga1c2942e68d263d674adf1381bc5e7083"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int nc_callhome_mngmt_server_rm </td>
          <td>(</td>
          <td class="paramtype">struct nc_mngmt_server *&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct nc_mngmt_server *&#160;</td>
          <td class="paramname"><em>remove</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Remove the specified management server description from the list. </p>
<p>To make this function available, you have to include <a class="el" href="../../d1/da1/libnetconf__ssh_8h.html" title="libnetconf&#39;s header for control libssh. ">libnetconf_ssh.h</a> or <a class="el" href="../../d5/d22/libnetconf__tls_8h.html" title="libnetconf&#39;s header for control openssl. ">libnetconf_tls.h</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">list</td><td>Management servers list to be modified. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">remove</td><td>Management server to be removed from the given list. The structure itself is not freed, use <a class="el" href="../../db/de7/group__callhome.html#ga3db211a665c56160c167619b633b6cb0" title="Free a management server description structure(s). The function doesn&#39;t free only the item refered by...">nc_callhome_mngmt_server_free()</a> to free it after calling <a class="el" href="../../db/de7/group__callhome.html#ga1c2942e68d263d674adf1381bc5e7083" title="Remove the specified management server description from the list. ">nc_callhome_mngmt_server_rm()</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>EXIT_SUCCESS or EXIT_FAILURE. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Fri Apr 15 2016 09:20:09 for libnetconf by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
